<!DOCTYPE html>
<html lang="en" ng-app="app" ng-cloak>
<head>
    <meta charset="UTF-8">
    <title></title>
    <link href="../../app/bower_components/bootstrap/dist/css/bootstrap.css" rel="stylesheet">
    <link href="../../app/bower_components/animate-css/animate.css" rel="stylesheet">

    <script src="../../app/bower_components/jquery/dist/jquery.js"></script>
    <script src="../../app/bower_components/angular/angular.js"></script>
    <script src="../../app/bower_components/angular-animate/angular-animate.js"></script>
    <style>

    </style>
</head>
<body ng-controller="AppController">
<button class="btn btn-success" ng-click="click();">btn</button>
<div ng-if="show" class="swing">
    xxx
</div>


<script>
    var app = angular.module('app', ['ngAnimate']);
    app.controller('AppController', function ($scope) {
        $scope.click = function () {
            $scope.show = !$scope.show;
        };
    });
    app.animation('.swing', function () {
        return {
            enter: function ($ele, done) {
                debugger;
            }
        }
    });

</script>

</body>
</html>